﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Globalization;
using System.Net.Mail;

namespace Web.Framework.Validation
{
    public class RegexUtility
    {     
        public bool IsValidEmail(string strIn)
        {
            bool invalid = false;
            try
            {
                strIn = new MailAddress(strIn).Address;
            }
            catch (FormatException)
            {
                //address is invalid
                invalid = true;
            }

            return !invalid;
        }       
    }
}
